﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;

namespace Transportr
{
#if PocketPC
    public delegate void MethodInvoker();

    public class NotifyCollectionChangedEventArgs : EventArgs
    {
    }

    public delegate void NotifyCollectionChangedEventHandler(object sender, NotifyCollectionChangedEventArgs args);

    public interface INotifyCollectionChanged
    {
        event NotifyCollectionChangedEventHandler CollectionChanged;
    }

    public class ObservableCollection<T> : List<T>, INotifyCollectionChanged
    {
        public event NotifyCollectionChangedEventHandler CollectionChanged;

        public new void Add(T item)
        {
            if (CollectionChanged != null)
            {
                CollectionChanged(this, new NotifyCollectionChangedEventArgs());
            }
            base.Add(item);
        }
    }

    public enum Visibility { Collapsed, Visible };
#endif
}
